#ifndef __Calibrate_Window_h_
#define __Calibrate_Window_h_

#include <QDialog>
#include "ui_CalibrateWindow.h"
#include "GloveStructs.h"
#include "DGlove.h"

namespace vkbrd
{
	struct CalibrationSliders
	{
		QSlider*		minValue;
		QProgressBar*	currValue;
		QSlider*		maxValue;

		CalibrationSliders(QSlider*	_minValue, QProgressBar* _currValue, 
			QSlider* _maxValue)
		{
			minValue = _minValue; currValue = _currValue; maxValue = _maxValue;
		}
	};

	class CalibrateWindow: public QDialog
	{
		Q_OBJECT

	public:
		CalibrateWindow(QWidget* _parent);

		/**
		*  Show instructions with next calibration step
		*/
		void nextScreen();

	public slots:

		void calibratePressed();

		void calibrationChanged(int _gloveId, FingerCalibration _calibration);

	signals:

		void calibrateSequence(BoolFingers _seq);

	private:

		Ui::Dialog					ui;
		QList<BoolFingers>			sequencesToConfigure;
		QList<CalibrationSliders>	sliders;
		int							currentSeqNum;
	};
} //namespace vkbrd

#endif //__Calibrate_Window_h_